import {  Modal } from 'antd';
import React  from 'react';
import {TdContext} from "../../../context"
const ComModal = (props) => {
    let {tit}=props.modalData
    let setOpen=(val)=>{
        props.closeModal(val)
    }
    return (
        <>
            <TdContext.Consumer>
                {
                    (value) =>{
                        let {open}=value;
                        return(
                            <Modal
                                title={tit}
                                centered
                                open={open}
                                onOk={() => setOpen(false)}
                                onCancel={() => setOpen(false)}
                                width="75%"
                            >
                                <p>some contents...</p>
                                <p>some contents...</p>
                                <p>some contents...</p>
                            </Modal>
                        )
                    }

                }
            </TdContext.Consumer>

        </>
    );
};
export default ComModal;